package evo.selectors;

import java.util.List;

public class HistoricalMaxSelector extends HistoricalSelector{

	public HistoricalMaxSelector(ISelector selector) {
		super(selector);
	}

	@Override
	protected double getVal(List<Double> historicalFitness) {
		double max = historicalFitness.get(0);
		for (int i=1; i<historicalFitness.size(); i++){
			if (historicalFitness.get(i)>max){
				max = historicalFitness.get(i);
			}
		}
		return max;
	}

}
